Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous improvements to archetype reflection #8432

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented Dec 12, 2024

Misc improvements to the reflection that I had to implement while investigating forward-compat, migration scripts, etc.

/// Does this have a particular scope?
///
/// e.g. `"blueprint"`.
pub scope: Option<&'static str>,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really useful to filter stuff at runtime, without having to rely on shady str::contains shenanigans.

Copy link

github-actions bot commented Dec 12, 2024

Web viewer failed to build.

| Result | Commit | Link | Manifest |
| ------ | ------- | ----- |
| ❌ | | https://rerun.io/viewer/pr/8432 | +nightly +main |

Note: This comment is updated whenever you push a commit.

Comment on lines +261 to +262
/// The name of the field (i.e. same as `ComponentDescriptor::archetype_field_name`).
pub name: &'static str,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mandatory in order to be able to recreate complete ComponentDescriptors at runtime.

@teh-cmc teh-cmc changed the title improved reflection Improved reflection Dec 12, 2024
@Wumpf Wumpf self-requested a review December 12, 2024 15:50
@teh-cmc teh-cmc force-pushed the cmc/improved_reflection branch from 7f4b73e to b334cf5 Compare December 12, 2024 15:51
@teh-cmc teh-cmc merged commit abccbe4 into main Dec 12, 2024
25 of 26 checks passed
@teh-cmc teh-cmc deleted the cmc/improved_reflection branch December 12, 2024 15:53
@teh-cmc teh-cmc changed the title Improved reflection Miscellaneous improvements to archetype reflection Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants